package org.hardstone.domain.sourcecode.resource;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;

import org.hardstone.domain.BaseItemDomain;
import org.hardstone.domain.BaseCategory;
import org.hardstone.domain.Status;

@Entity
@Table(name = "Java")
public class Java extends BaseItemDomain<Long> {

    @Column(name = "code")
    private String code;                    // Source code content

    @Column(name = "language")
    private String language;                // Programming language used

    @Column(name = "linesOfCode")
    private Long linesOfCode;               // Number of lines of code

    @Column(name = "complexity")
    private Long complexity;                // Code complexity metric

    @Column(name = "repository")
    private String repository;              // Source code repository URL

    public Java() {
    }

    public Java(Long id, Long itemGroupId, String name, BaseCategory category, Long userId, Long userGroupId, int authority, String url, String description, Status status, String askDate, String modifyDate, String tags, String attribute, String code, String language, Long linesOfCode, Long complexity, String repository) {
        super(id, itemGroupId, name, category, userId, userGroupId, authority, url, description, status, askDate, modifyDate, tags, attribute);
        this.code = code;
        this.language = language;
        this.linesOfCode = linesOfCode;
        this.complexity = complexity;
        this.repository = repository;
    }

    public Java(String code, String language, Long linesOfCode, Long complexity, String repository) {
        this.code = code;
        this.language = language;
        this.linesOfCode = linesOfCode;
        this.complexity = complexity;
        this.repository = repository;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public Long getLinesOfCode() {
        return linesOfCode;
    }

    public void setLinesOfCode(Long linesOfCode) {
        this.linesOfCode = linesOfCode;
    }

    public Long getComplexity() {
        return complexity;
    }

    public void setComplexity(Long complexity) {
        this.complexity = complexity;
    }

    public String getRepository() {
        return repository;
    }

    public void setRepository(String repository) {
        this.repository = repository;
    }
}